Published on

What's client and server

Authors

What is Client and Server?

Your browser relies on the internet, which is a network of computers that send messages to each other. We call these messages packets. Packets include the data you’re sending and information about where that data is coming from and where it’s going. Every computer on the internet has an address for sending packets to it.

But some computers only accept certain types of packets, and others only allow packets from a restricted list of other computers. It’s then up to the receiving computer to determine what to do with the packets and how to respond. For the purposes of this book, we’ll focus only on the data included in the packets (the HTTP messages), not the packets themselves. I’ll refer to these computers as either clients or servers.

The computer initiating requests is typically referred to as the client regardless of whether the request is initiated by a browser, command line, or so on. Servers refer to the websites and web applications receiving the requests. If the concept is applicable to either clients or servers, I refer to computers in general.

Because the internet can include any number of computers talking to each other, we need guidelines for how computers should communicate over the internet. This takes the form of Request for Comment (RFC) documents, which define standards for how computers should behave. For example, the Hypertext Transfer Protocol (HTTP) defines how your internet browser communicates with a remote server using Internet Protocol (IP).

In this scenario, both the client and server must agree to implement the same standards so they can understand the packets each is sending and receiving.